<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * CakePHP newHelper
 * @author Ana Dalva Oliveira
 */
App::import('Midias.Vendor', 'LessPHP', array('file' => 'lessphp-master' . DS . 'lessc.inc.php'));

class LessHelper extends AppHelper {

    public $helpers = array();

    public function __construct(View $View, $settings = array()) {
        parent::__construct($View, $settings);
    }

    public function compilar($css = null) {
        require App::pluginPath('Midias') . 'Vendor' . DS . 'lessphp-master' . DS . 'lessc.inc.php';
        $_less = new lessc;
        return $_less->compile($css);
    }

}
